//
// Created by liushuai on 2020/5/5.
//

#ifndef DBFS_DFS_TREE_H
#define DBFS_DFS_TREE_H

#include "TreeNode.h"
#include <iostream>
#include <stack>
#include <vector>
void dfs_tree_rec(TreeNode*root);
void dfs_tree_stack(TreeNode*root);
//void dfs_travel_layer(TreeNode*root,int layer,std::vector<std::vector<int>>& result);
void dfs_travel_layer(TreeNode*root,int layer,std::vector<std::vector<int>>& result);
std::vector<std::vector<int>> dfs_travel_layer(TreeNode* root);
int maxDepth(TreeNode* root);
#endif //DBFS_DFS_TREE_H
